package com.zw.api;/*
 *@program:java-cloud-prevalence
 *@author:
 *@Time: 2022/12/6  23:34
 *@description: 系统服务远程调用接口
 */

import com.zw.object.result.Result;
import com.zw.object.system.SysRole;
import com.zw.object.vo.RouterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "system-service")
public interface SystemFeignClient {

    @GetMapping("/admin/system/sysRole/findAll")
    Result<List<SysRole>> findAll();

    @RequestMapping("/admin/system/sysMenu/findUserMenuList")
    List<RouterVo> findUserMenuList(@RequestParam(value = "userId") String userId);

    @RequestMapping("/admin/system/sysMenu/findUserPermsList")
    List<String> findUserPermsList(@RequestParam(value = "userId") String userId);

    @RequestMapping("/admin/system/sysMenu/feignFindUserMenuList")
    List<String> findUserPermsListToFeign(@RequestParam("userId") String userId);
}
